// Application/Services/IFileService.cs
using MediatR;
using UniversalAdmin.Application.Common;
using UniversalAdmin.Application.DTOs;

namespace UniversalAdmin.Application.Services;

public interface IFileService
{
  Task<ApiResult<FileDto>> UploadAsync(
        Stream stream, string originalName, string contentType, long length, int userId,
        CancellationToken ct = default);

  Task<PagedResult<FileDto>> GetFilesAsync(
      FileQueryParameters parameters, CancellationToken ct = default);

  Task<ApiResult<FileDto>> GetFileByIdAsync(int id, int actorUserId, CancellationToken ct = default);

  Task<ApiResult<Unit>> DeleteAsync(int fileId, int actorUserId, CancellationToken ct = default);
}